<%--
  @desc: 客户端管理
  @author: chenw
  @create: 2014-5-26 AM 11:44
--%>
<%@ page contentType="text/html;charset=utf-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="/WEB-INF/taglib/econsole" prefix="econsole" %>
<style type="text/css">
    .keywords {
        width: 250px;
        font-family: '微软雅黑', sans-serif, serif;
    }
</style>
<div class="pageHeader">
    <form rel="pageForm" onsubmit="return navTabSearch(this);" action="<c:url value='/member/index'/>" method="post">
        <div class="searchBar">
            <ul>
                <li style="float: left;line-height: 25px;">
                    <label style="width: 50px;">关键字：</label>
                    <input name="keywords" type="text" value="${query.keywords}" placeholder="请输入姓名、电话进行检索"
                           class="keywords"/>
                </li>
                 <li style="float: left; line-height: 25px;">
                    <label>用户类型：</label>
                     <select name="userSrc">
                         <option value="">全部</option>
                         <option value="P"
                                 <c:if test="${query.userSrc=='P'}">selected="selected"</c:if>>大厅用户
                         </option>
                         <option value="W"
                                 <c:if test="${query.userSrc=='W'}">selected="selected"</c:if>>微信用户
                         </option>
                         <option value="I"
                                 <c:if test="${query.userSrc=='I'}">selected="selected"</c:if>>苹果用户
                         </option>
                         <option value="A"
                                 <c:if test="${query.userSrc=='A'}">selected="selected"</c:if>>安卓用户
                         </option>
                     </select>
                </li>
                <li style="float: left;line-height: 25px;">
                    <label style="width:60px;">注册时间：</label>
                    <input name="start" type="text" class="date" dateFmt="yyyy-MM-dd HH:mm:ss"
                           value="<fmt:formatDate value="${query.start}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                           placeholder="起始时间"
                           style="width:100px;font-family:'微软雅黑 sans-serif serif';"/>
                    -
                    <input name="end" type="text" class="date" dateFmt="yyyy-MM-dd HH:mm:ss"
                           value="<fmt:formatDate value="${query.end}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                           placeholder="结束时间"
                           style="width:100px;font-family:'微软雅黑 sans-serif serif';"/>
                </li>
                <li>
                    <div class="buttonActive" style="margin-left: 5px;">
                        <div class="buttonContent">
                            <button type="submit">查找</button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>
</div>
<div class="pageContent" style="padding-top: 1px;">
    <%-- <div class="panelBar">
       <ul class="toolBar" style="float: left;display: inline-block;">
            <li><a class="add" href="<c:url value='/member/view/{sel_id}'/>" target="dialog" width="520" height="400"
                   mask="true" resizable="false"
                   maxable="false" title="查看用户" rel="dlg_sys_user_view"><span>查看</span></a></li>
            <li class="line"></li>
            <li><a class="add" href="<c:url value='/member/change/{sel_id}'/>" target="dialog" width="500" height="250"
                   mask="true"
                   resizable="false"
                   maxable="false" title="用户状态更新" rel="dlg_sys_user_view"><span>状态更新</span></a></li>
        </ul>
    </div>--%>
    <table class="table" width="100%" layoutH="114">
        <thead>
        <tr>
            <th width="40" align="center">序号</th>
            <%--<th width="100">用户名</th>--%>
            <th width="100">姓名</th>
            <th width="140">身份证号</th>
            <th width="100">手机号</th>
            <th width="100">联系地址</th>
            <th width="100">用户类型</th>
            <th width="100">电话号码</th>
            <th width="150">注册时间</th>
            <th>状态</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach var="user" items="${pager.list}" varStatus="vs">
            <tr target="sel_id" rel="${user.id}">
                <td width="40">${vs.count+(pager.pageNum-1)*pager.numPerPage}</td>
                <%--<td width="100">${user.loginId}</td>--%>
                <td width="100">${user.realName}</td>
                <td width="140">${user.idCard}</td>
                <td width="100">${user.loginId}</td>
                <td width="100">${user.address}</td>
                <td width="100">
                    <c:choose>
                        <%--P：大厅；W：微信；I：苹果；A：安卓--%>
                        <c:when test="${user.userSrc=='P'}">
                            大厅
                        </c:when>
                        <c:when test="${user.userSrc=='W'}">
                            微信
                        </c:when>
                        <c:when test="${user.userSrc=='I'}">
                            苹果
                        </c:when>
                        <c:when test="${user.userSrc=='A'}">
                            安卓
                        </c:when>
                    </c:choose>
                </td>
                <td width="100">${user.tel}</td>
                <td width="120"><fmt:formatDate value="${user.regTime}" pattern="yyyy-MM-dd HH:mm"/></td>
                <td><econsole:selectValue code="1000" value="${user.status}"/></td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示&nbsp;</span>
            <label for="cob_ps"></label>
            <select id="cob_ps" class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="20">20</option>
                <option value="50">50</option>
                <option value="100">100</option>
                <option value="200">200</option>
            </select>
            <span>条，共${pager.total}条</span>
        </div>
        <div class="pagination" targetType="navTab" totalCount="${pager.total}" numPerPage="${pager.numPerPage}"
             pageNumShown="10"
             currentPage="${pager.pageNum}"></div>
    </div>
    <form id="pagerForm" method="post" action="<c:url value='/member/index'/>">
        <input type="hidden" name="pageNum" value="${pager.pageNum}"/>
        <input type="hidden" name="userSrc" value="${query.userSrc}"/>
        <input type="hidden" name="keywords" value="${query.keywords}"/>
        <input type="hidden" name="numPerPage" value="${pager.numPerPage}"/>
        <input type="hidden" name="orderField" value="${query.orderField}"/>
        <input type="hidden" name="orderDirection" value="${query.orderDirection}"/>
        <input type="hidden" name="start"
               value="<fmt:formatDate value="${query.start}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
        <input type="hidden" name="end" value="<fmt:formatDate value="${query.end}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
    </form>
</div>
